FilCDN M2 Payment Setup

Motivation

We want a simple payment setup that rewards both CDN and SP for serving retrievals, but serves more as a placeholder for future iterations than trying to be a fully specced out system. It has two goals: There are payments, but they are not hindering product development. It’s not too expensive, and not too complex.

Payment Rails

For each PDP proof set withCDN=true, there will be 3 payment rails:

  1. PDP
    1. Cashflow: Client ➡️ SP
    1. Expectation: SP fulfills PDP proofs
    1. Verifier: PDPVerifier
    1. Settlement: Validated by PDP verifier
    1. Example: Client pays SP 2$ for storing 1TB of data for 1 month.
    1. Notes
      1. This is already in place and owned by the FilOz team
  1. SP serves cache misses to CDN
    1. Cashflow: Client ➡️ SP
    1. Expectation: SP serves PDP data to FilCDN (on cache miss) only if `addCDN` is purchased
    1. Verifier: CDNVerifier
    1. Pricing scheme: .50$/m
    1. Settlement:
      1. validated by CDNVerifier, which tracks SP availability. For now, FilCDN only cares whether the SP was able to serve the file on cache-miss or not.
      1. We would like to deploy an initial version without the verifier, in which case the SP can withdraw independently of their performance - for the sake of an iterative approach. Question: Is it acceptable to ship without a verifier to early users? Or does there have to be a verifier, guiding the relationship between user and SP?
    1. Example: Client pays SP .50$ per month for reliably serving cache-miss egress to the CDN.
    1. Notes:
      1. From a legal perspective it’s safer when the Client rewards the SP for FilCDN services, and not FilCDN
      1. FilCDN can still ensure through a verifier contract that SP only gets rewarded if they perform well. For this, FilCDN doesn’t need to be the one paying the SP - thanks to the verifier concept.
      1. This flat fee can be adjusted later on, once we have learned more. It represents half of what’s defined in https://github.com/FilOzone/filecoin-services/blob/1b99d8b39bf7f35608884b0bd7bd768810ee2372/service_contracts/src/PandoraService.sol#L39
  1. FilCDN serves retrievals
    1. Cashflow: Client ➡️ FilCDN
    1. Expectation: FilCDN serves retrievals
    1. Verifier: ❌ (Trusted)
    1. Pricing scheme: .50$/m
    1. Settlement:
      1. No requirements, FilCDN is a trusted party
    1. Example: Client pays FilCDN .50$ for accelerating PDP content for one month.
    1. Notes:
      1. For now, FilCDN will have to be trusted (lack of proof of retrieval). Potential future solution: Marketplace of different CDNs
      1. This flat fee can be adjusted later on, once we have learned more. It represents half of what’s defined in https://github.com/FilOzone/filecoin-services/blob/1b99d8b39bf7f35608884b0bd7bd768810ee2372/service_contracts/src/PandoraService.sol#L39

References

Notes

  • When reading, replace every mention of $ with USDFC